<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog',array(
    'id'=>'notesDialog',
    'options'=>array(
        'title'=>Yii::t('site','View Notes for item {itemName}',array('{itemName}'=>$itemName)),
        'autoOpen'=>true,
        'modal'=>'true',
        'width'=>'auto',
        'height'=>'auto',
    ),
));
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'note-grid',
    'dataProvider'=>$model->search(),
    //'filter'=>$model,
    'summaryCssClass' => 'gridViewSummary',
    'template' => "{summary}\n{pager}\n{items}\n{pager}",
    'htmlOptions' => array(
        //'style' => 'width: 1200px'
    ),
    'columns'=>array(
        array(
            'class'=>'CButtonColumn',
        ),
        array(
            'name' =>$model->getAttributeLabel('userIdCreated'),
            'type' => 'raw',
            'value' => 'CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->tsCreated,"medium","short"))."<br/>".CHtml::encode($data->createdBy->recordName)',
        ),
        array(
            'name' => 'content',
            'type' => 'raw',
            'value' => 'nl2br(CHtml::encode($data->content))'
        ),
    ),
));
$this->endWidget('zii.widgets.jui.CJuiDialog'); 
?>

<div class="flash-notice note">
<p class="title"><?php echo Yii::t('site','Note:'); ?></p>
<?php echo Yii::t('site','Press ESC to close this dialog'); ?>
</div>
